package lab2_prelab;

/**
 * <p>Title: Jet</p>
 * <p>Description: CS 235 Lab #2</p>
 * 	    This class is used to illustrate encapsulation, 
 * 		inheritance and polymorphism.
 *      See the related	Airplane class.
 * @author This code is from "Head First Object Oriented Design"
 * @date   August 8th 2013
 */
public class Jet extends Airplane {
	/**
	 * Data members - MULTIPLIER and ACCELERATION_MULTIPLIER
	 */
	private static final int MULTIPLIER = 2;
	private static final int ACCELERATION_MULTIPLIER = 2;

	/**
	 * Default constructor for Jet
	 */
	public Jet() {
		super();
	}

	/**
	 * setSpeed - set method for data member speed
	 * 			  this method overrides the setSpeed
	 * 			  method inherited from the Airplane
	 * 			  class.
	 * @param speed
	 */
	public void setSpeed(int speed){
		super.setSpeed( speed*MULTIPLIER );
	}
	
	/**
	 * accelerate - method to increase speed by a factor.
	 */
	public void accelerate(){
		super.setSpeed(getSpeed()*ACCELERATION_MULTIPLIER);
	}
}
